Array and MakeArray (x, ...) are equivalent functions. However, Array cannot be used in Crystal syntax since it is a keyword for declaring array variables in that syntax.
The given arguments are array elements with which to initialize the array. The number of array elements can be any number between 1 and 1000. All the arguments must be of the same type. Unlike Visual Basic, you may not have 0 number of elements.
The Array function creates an array, initializes it with the given array elements and returns it.
To create and initialize an array variable in Basic syntax.
In Crystal syntax, you can use the square bracket notation for arrays instead.
The following example is applicable to Basic syntax:
The following sets up an array of days for a week, starting with Monday:
week = Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", _
Rem firstDay contains "Monday"
This function is designed to work like the Visual Basic function of the same name.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |